package com.sd.domain;

import java.util.Date;

/**
 * im收藏实体类
 * @author yexinming
 * @date 2020/07/28
 */
public class ImCollect {
    /**
     * 主键
     */
    private Long id;
    /**
     * 坐席id
     */
    private String agentId;
    /**
     * 用户id
     */
    private String userId;
    /**
     * 收藏类型:1-文本 2-图片
     */
    private Integer type;
    /**
     * 消息内容
     */
    private String content;
    /**
     *消息来源:1-坐席发送 2-客户发送
     */
    private Integer source;
    /**
     * 文件路径
     */
    private String filePath;
    /**
     * 创建时间
     */
    private Date gmtCreate;
    /**
     * 修改时间
     */
    private Date gmtModified;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAgentId() {
        return agentId;
    }

    public void setAgentId(String agentId) {
        this.agentId = agentId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getSource() {
        return source;
    }

    public void setSource(Integer source) {
        this.source = source;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getFilePath() {
        return filePath;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ImCollect collect = (ImCollect) o;

        if (id != null ? !id.equals(collect.id) : collect.id != null) return false;
        if (agentId != null ? !agentId.equals(collect.agentId) : collect.agentId != null) return false;
        if (userId != null ? !userId.equals(collect.userId) : collect.userId != null) return false;
        if (type != null ? !type.equals(collect.type) : collect.type != null) return false;
        if (content != null ? !content.equals(collect.content) : collect.content != null) return false;
        if (source != null ? !source.equals(collect.source) : collect.source != null) return false;
        if (filePath != null ? !filePath.equals(collect.filePath) : collect.filePath != null) return false;
        if (gmtCreate != null ? !gmtCreate.equals(collect.gmtCreate) : collect.gmtCreate != null) return false;
        return gmtModified != null ? gmtModified.equals(collect.gmtModified) : collect.gmtModified == null;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (agentId != null ? agentId.hashCode() : 0);
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (content != null ? content.hashCode() : 0);
        result = 31 * result + (source != null ? source.hashCode() : 0);
        result = 31 * result + (filePath != null ? filePath.hashCode() : 0);
        result = 31 * result + (gmtCreate != null ? gmtCreate.hashCode() : 0);
        result = 31 * result + (gmtModified != null ? gmtModified.hashCode() : 0);
        return result;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    @Override
    public String toString() {
        return "ImCollect{" +
                "id=" + id +
                ", agentId='" + agentId + '\'' +
                ", userId='" + userId + '\'' +
                ", type=" + type +
                ", content='" + content + '\'' +
                ", source=" + source +
                ", filePath='" + filePath + '\'' +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                '}';
    }
}
